package com.dotflat.docs.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/13
 * *******************************
 */
@Entity
@Data
@Table(name = "tb_document_directory", uniqueConstraints = {@UniqueConstraint(columnNames = {"areaId", "type", "name"})})
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class DocumentDirectory extends AreableObjectBase {

    @Column(columnDefinition = " varchar(32)  COMMENT '老师id'")
    private String staffId;

    @Column(name = "cover", columnDefinition = "varchar(255)  COMMENT '描述'")
    private String cover="";

    @Column(name = "name", columnDefinition = " varchar(50)  COMMENT '名称'", nullable = false)
    private String title;

    @Column(name = "content", columnDefinition = " varchar(200)  COMMENT '描述'")
    private String content="";

    @Column(columnDefinition = " int default 0  COMMENT '类型,主要使用以区分所有需要分类对待的情况, 0.文档, 1.教学资源'")
    private Integer type = 0;

    @Column(columnDefinition = " int default 0  COMMENT '顺序'")
    private Integer sort = 0;

    @Column(columnDefinition = " int default 0  COMMENT '内容数量'", nullable =  false)
    private Integer itemCount = 0;

    @Column(columnDefinition = " varchar(255)  COMMENT '上传老师名字'")
    private String staffName;

    @Column(columnDefinition = " varchar(500)  COMMENT '上传老师头像'")
    private String staffHeadImg;

}
